# coding: utf-8
from kafka import KafkaProducer
from kafka import KafkaConsumer
import csv
import time,random

consumer = KafkaConsumer(
#    bootstrap_servers = "域名:port", # kafka集群地址
    auto_offset_reset='earliest',
    bootstrap_servers = "cheng:9092",
    group_id = "niit1111",
    )
# consumer.subscribe(["test11"])
# consumer.subscribe(["stuInfo"])
# consumer.subscribe(["supermarket"])
# consumer.subscribe(["library"])
# consumer.subscribe(["attendance"])
consumer.subscribe(["orders"])
for msg in consumer:
    print((msg.value).decode('utf8'))

